home *** CD-ROM | disk | FTP | other *** search
- ' Demo Script ACODemo4.Vbs
- '
- ' Alpha Centauri - March 1998
- ' ---------------------------
-
- Dim etFlat ' EdgeType Constant
- Dim tsSpace ' ThousandsSep Constant
- Dim lbShort ' Label Constant
- Dim trHigh ' Threshold Constant
- Dim trMiddle ' Threshold Constant
- Dim trLow ' Threshold Constant
-
- ' Set Constants
- etRaised = 0
- tsSpace = 0
- lbShort = 0
- trHigh = 0
- trMiddle = 1
- trLow = 2
-
- ' Connect to Personal Express and open the ACODemo Database
- Call ACOTable.Connect(False)
- Call ACOTable.Open("C:\PROGRA~1\ACOTABLE\ACODEMO", True)
-
- ACOTable.AutoRefresh = FALSE
-
- ' Remove previously selected Measures
- Call ACOTable.RemoveAllMeasures()
-
- ' Set General Measure Properties
- ACOTable.Decimals = 0
- ACOTable.ThousandsSep = tsSpace
- ACOTable.EdgeTypeDown = etFlat
- ACOTable.FontColor = 255*256*256 + 0 + 0
- ACOTable.DownEdgeFillColor = 234*256*256 + 219*256 + 160
-
- ' Add the following measures to the table
- Call ACOTable.AddCustomMeasure("UNITSLY", "Lag(UNITS, 12, TIME)","ACODEMO")
- Call ACOTable.AddMeasure("UNITS")
- Call ACOTable.AddCustomMeasure("UNITSLYPCT", "LagPct(UNITS, 12, TIME)*100","ACODEMO")
-
- ' Set Labels for the measures
- Call ACOTable.SetMeasLabel("UNITS", lbShort, "Units")
- Call ACOTable.SetMeasLabel("UNITSLY", lbShort, "Units LY")
- Call ACOTable.SetMeasLabel("UNITSLYPCT", lbShort, "Units vs LY %")
-
- ' Set specific properties for the measure UNITSLY
- Call ACOTable.SetMeasUseDisplayFormat("UNITSLY", TRUE)
- Call ACOTable.SetMeasFillColor("UNITSLY", 195*256*256 + 195*256 + 228)
-
- ' Set specific properties for the measure UNITS
- Call ACOTable.SetMeasUseDisplayFormat("UNITS", TRUE)
- Call ACOTable.SetMeasFillColor("UNITS", 193*256*256 + 228*256 + 193)
-
- ' Set specific properties for the measure UNITSLYPCT
- Call ACOTable.SetMeasUseDisplayFormat("UNITSLYPCT", TRUE)
- Call ACOTable.SetMeasUseMeasureFormat("UNITSLYPCT", TRUE)
- Call ACOTable.SetMeasSuffix("UNITSLYPCT", " %")
- Call ACOTable.SetMeasDecimals("UNITSLYPCT",2)
-
- ' Set ThresholdCoding Properties for UNITSLYPCT
- Call ACOTable.SetMeasUseThresholdCoding("UNITSLYPCT", TRUE)
- Call ACOTable.SetMeasThreshold("UNITSLYPCT",trHigh, 5)
- Call ACOTable.SetMeasThreshold("UNITSLYPCT",trLow, -5)
- Call ACOTable.SetMeasThresholdFillColor("UNITSLYPCT", trHigh, 0 + 255*256 + 0)
- Call ACOTable.SetMeasThresholdFillColor("UNITSLYPCT", trMiddle, 222*256*256 + 222*256 + 222)
- Call ACOTable.SetMeasThresholdFillColor("UNITSLYPCT", trLow, 0 + 0 + 255)
- Call ACOTable.SetMeasThresholdFontColor("UNITSLYPCT", trHigh, 0 + 0 + 0)
- Call ACOTable.SetMeasThresholdFontColor("UNITSLYPCT", trMiddle, 0 + 0 + 0)
- Call ACOTable.SetMeasThresholdFontColor("UNITSLYPCT", trLow, 0 + 0 + 0)
-
- ' Rotate dimensions
- ' Move TIME to the ACROSS Edge next to MEASURE
- Call ACOTable.ChangeEdge("TIME", 1)
-
- ' Select TIME & GEOGRAPHY
- Call ACOTable.SetSelection("TIME", 0, "Lmt TIME To T0.RangeOfMonth; Limit TIME keep Last 6")
- Call ACOTable.SetSelection("GEOGRAPHY", 1)
-
- ACOTable.AutoRefresh = TRUE
-
- Call MsgBox("Create two custom measures : " + _
- Chr(10) + Chr(13) + _
- "Units Last Year " + _
- Chr(10) + Chr(13) + _
- "Units Last Year % " + _
- Chr(10) + Chr(13) + _
- "and apply colour coding to them.", _
- 64, "ACOTable DemoScript 4")
-